<% content_for(:head) do %>
  <meta name="robots" content="noindex, nofollow">
<% end %>

<!doctype html>
<html lang="<%= I18n.locale %>">
  <head>
    <%= render 'spree/shared/head' %>
    <%= render 'spree/shared/custom_head' %>
  </head>
  <body id="checkout-page" class="theme-<%= current_theme.class.name.demodulize.underscore %> w-full bg-background text-text">
    <%= render_storefront_partials(:body_start_partials) %>
    <%= current_store.storefront_custom_code_body_start&.html_safe %>

    <div id="overlay" class="overlay"></div>

    <div class="w-full min-h-screen text-muted bg-background" id="checkout-container">
      <header
        class="checkout-mobile-header lg:hidden relative z-[999] bg-background tailwind-container text-center py-3 mx-auto"
        id="checkout-mobile-header"
        data-turbo-permanent>
        <%= render 'spree/shared/logo', logo: current_header_logo, logo_css: 'ml-5' %>
      </header>
      <div class="grid min-h-screen checkout-container">
        <div class="flex flex-col items-end" id="checkout-main">
          <div class="checkout-main-container">
            <header
              class="mb-0 hidden lg:block"
              id="checkout-desktop-header"
              data-turbo-permanent>
              <%= render 'spree/shared/logo', logo: current_header_logo %>
            </header>
            <%= turbo_frame_tag :flash do %>
              <%= render('spree/shared/flashes') %>
            <% end %>
            <div id="checkout">
              <%= yield %>
            </div>
          </div>
          <footer
            class="mt-5"
            id="checkout-footer"
            data-turbo-permanent>
            <%= render 'spree/checkout/footer' %>
          </footer>
        </div>
        <div class="flex flex-col items-start col-span-2" id="checkout-summary">
          <div class="checkout-summary-container">
            <%= render 'spree/checkout/sidebar' %>
          </div>
        </div>
      </div>
    </div>

    <%= current_store.storefront_custom_code_body_end&.html_safe %>
    <%= render_storefront_partials(:body_end_partials) %>
  </body>
</html>
